//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2024 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto-codegenerator.
// DO NOT EDIT.

#if canImport(FoundationEssentials)
import FoundationEssentials
#else
import Foundation
#endif
@_spi(SotoInternal) import SotoCore

extension MWAA {
    // MARK: Enums

    public enum EndpointManagement: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case customer = "CUSTOMER"
        case service = "SERVICE"
        public var description: String { return self.rawValue }
    }

    public enum EnvironmentStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case available = "AVAILABLE"
        case createFailed = "CREATE_FAILED"
        case creating = "CREATING"
        case creatingSnapshot = "CREATING_SNAPSHOT"
        case deleted = "DELETED"
        case deleting = "DELETING"
        case maintenance = "MAINTENANCE"
        case pending = "PENDING"
        case rollingBack = "ROLLING_BACK"
        case unavailable = "UNAVAILABLE"
        case updateFailed = "UPDATE_FAILED"
        case updating = "UPDATING"
        public var description: String { return self.rawValue }
    }

    public enum LoggingLevel: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case critical = "CRITICAL"
        case debug = "DEBUG"
        case error = "ERROR"
        case info = "INFO"
        case warning = "WARNING"
        public var description: String { return self.rawValue }
    }

    public enum RestApiMethod: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case delete = "DELETE"
        case get = "GET"
        case patch = "PATCH"
        case post = "POST"
        case put = "PUT"
        public var description: String { return self.rawValue }
    }

    public enum Unit: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case bits = "Bits"
        case bitsSecond = "Bits/Second"
        case bytes = "Bytes"
        case bytesSecond = "Bytes/Second"
        case count = "Count"
        case countSecond = "Count/Second"
        case gigabits = "Gigabits"
        case gigabitsSecond = "Gigabits/Second"
        case gigabytes = "Gigabytes"
        case gigabytesSecond = "Gigabytes/Second"
        case kilobits = "Kilobits"
        case kilobitsSecond = "Kilobits/Second"
        case kilobytes = "Kilobytes"
        case kilobytesSecond = "Kilobytes/Second"
        case megabits = "Megabits"
        case megabitsSecond = "Megabits/Second"
        case megabytes = "Megabytes"
        case megabytesSecond = "Megabytes/Second"
        case microseconds = "Microseconds"
        case milliseconds = "Milliseconds"
        case none = "None"
        case percent = "Percent"
        case seconds = "Seconds"
        case terabits = "Terabits"
        case terabitsSecond = "Terabits/Second"
        case terabytes = "Terabytes"
        case terabytesSecond = "Terabytes/Second"
        public var description: String { return self.rawValue }
    }

    public enum UpdateStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case failed = "FAILED"
        case pending = "PENDING"
        case success = "SUCCESS"
        public var description: String { return self.rawValue }
    }

    public enum WebserverAccessMode: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case privateOnly = "PRIVATE_ONLY"
        case publicOnly = "PUBLIC_ONLY"
        public var description: String { return self.rawValue }
    }

    public enum WorkerReplacementStrategy: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case forced = "FORCED"
        case graceful = "GRACEFUL"
        public var description: String { return self.rawValue }
    }

    // MARK: Shapes

    public struct CreateCliTokenRequest: AWSEncodableShape {
        /// The name of the Amazon MWAA environment. For example, MyMWAAEnvironment.
        public let name: String

        @inlinable
        public init(name: String) {
            self.name = name
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.name, key: "Name")
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 80)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[a-zA-Z][0-9a-zA-Z-_]*$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct CreateCliTokenResponse: AWSDecodableShape {
        /// An Airflow CLI login token.
        public let cliToken: String?
        /// The Airflow web server hostname for the environment.
        public let webServerHostname: String?

        @inlinable
        public init(cliToken: String? = nil, webServerHostname: String? = nil) {
            self.cliToken = cliToken
            self.webServerHostname = webServerHostname
        }

        private enum CodingKeys: String, CodingKey {
            case cliToken = "CliToken"
            case webServerHostname = "WebServerHostname"
        }
    }

    public struct CreateEnvironmentInput: AWSEncodableShape {
        /// A list of key-value pairs containing the Apache Airflow configuration options you want to attach to your environment. For more information, see Apache Airflow configuration options.
        public let airflowConfigurationOptions: [String: String]?
        /// The Apache Airflow version for your environment. If no value is specified, it defaults to the latest version. For more information, see Apache Airflow versions on Amazon Managed Workflows for Apache Airflow (Amazon MWAA). Valid values: 1.10.12, 2.0.2, 2.2.2, 2.4.3, 2.5.1, 2.6.3, 2.7.2, 2.8.1, 2.9.2, 2.10.1, and 2.10.3.
        public let airflowVersion: String?
        /// The relative path to the DAGs folder on your Amazon S3 bucket. For example, dags. For more information, see Adding or updating DAGs.
        public let dagS3Path: String
        /// Defines whether the VPC endpoints configured for the environment are created, and managed, by the customer or by Amazon MWAA. If set to SERVICE, Amazon MWAA will create and manage the required VPC endpoints in your VPC. If set to CUSTOMER, you must create, and manage, the VPC endpoints for your VPC. If you choose to create an environment in a shared VPC, you must set this value to CUSTOMER. In a shared VPC deployment, the environment will remain in PENDING status until you create the VPC endpoints. If you do not take action to create the endpoints within 72 hours, the status will change to CREATE_FAILED. You can delete the failed environment and create a new one.
        public let endpointManagement: EndpointManagement?
        /// The environment class type. Valid values: mw1.micro, mw1.small, mw1.medium, mw1.large, mw1.xlarge, and mw1.2xlarge. For more information, see Amazon MWAA environment class.
        public let environmentClass: String?
        /// The Amazon Resource Name (ARN) of the execution role for your environment. An execution role is an Amazon Web Services Identity and Access Management (IAM) role that grants MWAA permission to access Amazon Web Services services and resources used by your environment. For example, arn:aws:iam::123456789:role/my-execution-role. For more information, see Amazon MWAA Execution role.
        public let executionRoleArn: String
        /// The Amazon Web Services Key Management Service (KMS) key to encrypt the data in your environment. You can use an Amazon Web Services owned CMK, or a Customer managed CMK (advanced). For more information, see Create an Amazon MWAA environment.
        public let kmsKey: String?
        /// Defines the Apache Airflow logs to send to CloudWatch Logs.
        public let loggingConfiguration: LoggingConfigurationInput?
        ///  The maximum number of web servers that you want to run in your environment. Amazon MWAA scales the number of Apache Airflow web servers up to the number you specify for MaxWebservers when you interact with your Apache Airflow environment using Apache Airflow REST API, or the Apache Airflow CLI. For example, in scenarios where your workload requires network calls to the Apache Airflow REST API with a high transaction-per-second (TPS) rate, Amazon MWAA will increase the number of web servers up to the number set in MaxWebserers. As TPS rates decrease Amazon MWAA disposes of the additional web servers, and scales down to the number set in MinxWebserers.  Valid values: For environments larger than mw1.micro, accepts values from 2 to 5. Defaults to 2 for all environment sizes except mw1.micro, which defaults to 1.
        public let maxWebservers: Int?
        /// The maximum number of workers that you want to run in your environment. MWAA scales the number of Apache Airflow workers up to the number you specify in the MaxWorkers field. For example, 20. When there are no more tasks running, and no more in the queue, MWAA disposes of the extra workers leaving the one worker that is included with your environment, or the number you specify in MinWorkers.
        public let maxWorkers: Int?
        ///  The minimum number of web servers that you want to run in your environment. Amazon MWAA scales the number of Apache Airflow web servers up to the number you specify for MaxWebservers when you interact with your Apache Airflow environment using Apache Airflow REST API, or the Apache Airflow CLI. As the transaction-per-second rate, and the network load, decrease, Amazon MWAA disposes of the additional web servers, and scales down to the number set in MinxWebserers.  Valid values: For environments larger than mw1.micro, accepts values from 2 to 5. Defaults to 2 for all environment sizes except mw1.micro, which defaults to 1.
        public let minWebservers: Int?
        /// The minimum number of workers that you want to run in your environment. MWAA scales the number of Apache Airflow workers up to the number you specify in the MaxWorkers field. When there are no more tasks running, and no more in the queue, MWAA disposes of the extra workers leaving the worker count you specify in the MinWorkers field. For example, 2.
        public let minWorkers: Int?
        /// The name of the Amazon MWAA environment. For example, MyMWAAEnvironment.
        public let name: String
        /// The VPC networking components used to secure and enable network traffic between the Amazon Web Services resources for your environment. For more information, see About networking on Amazon MWAA.
        public let networkConfiguration: NetworkConfiguration
        /// The version of the plugins.zip file on your Amazon S3 bucket. You must specify a version each time a plugins.zip file is updated. For more information, see How S3 Versioning works.
        public let pluginsS3ObjectVersion: String?
        /// The relative path to the plugins.zip file on your Amazon S3 bucket. For example, plugins.zip. If specified, then the plugins.zip version is required. For more information, see Installing custom plugins.
        public let pluginsS3Path: String?
        /// The version of the requirements.txt file on your Amazon S3 bucket. You must specify a version each time a requirements.txt file is updated. For more information, see How S3 Versioning works.
        public let requirementsS3ObjectVersion: String?
        /// The relative path to the requirements.txt file on your Amazon S3 bucket. For example, requirements.txt. If specified, then a version is required. For more information, see Installing Python dependencies.
        public let requirementsS3Path: String?
        /// The number of Apache Airflow schedulers to run in your environment. Valid values:   v2 - For environments larger than mw1.micro, accepts values from 2 to 5. Defaults to 2 for all environment sizes except mw1.micro, which defaults to 1.   v1 - Accepts 1.
        public let schedulers: Int?
        /// The Amazon Resource Name (ARN) of the Amazon S3 bucket where your DAG code and supporting files are stored. For example, arn:aws:s3:::my-airflow-bucket-unique-name. For more information, see Create an Amazon S3 bucket for Amazon MWAA.
        public let sourceBucketArn: String
        /// The version of the startup shell script in your Amazon S3 bucket. You must specify the version ID that Amazon S3 assigns to the file every time you update the script.   Version IDs are Unicode, UTF-8 encoded, URL-ready, opaque strings that are no more than 1,024 bytes long. The following is an example:   3sL4kqtJlcpXroDTDmJ+rmSpXd3dIbrHY+MTRCxf3vjVBH40Nr8X8gdRQBpUMLUo   For more information, see Using a startup script.
        public let startupScriptS3ObjectVersion: String?
        /// The relative path to the startup shell script in your Amazon S3 bucket. For example, s3://mwaa-environment/startup.sh.  Amazon MWAA runs the script as your environment starts, and before running the Apache Airflow process. You can use this script to install dependencies, modify Apache Airflow configuration options, and set environment variables. For more information, see Using a startup script.
        public let startupScriptS3Path: String?
        /// The key-value tag pairs you want to associate to your environment. For example, "Environment": "Staging". For more information, see Tagging Amazon Web Services resources.
        public let tags: [String: String]?
        /// Defines the access mode for the Apache Airflow web server. For more information, see Apache Airflow access modes.
        public let webserverAccessMode: WebserverAccessMode?
        /// The day and time of the week in Coordinated Universal Time (UTC) 24-hour standard time to start weekly maintenance updates of your environment in the following format: DAY:HH:MM. For example: TUE:03:30. You can specify a start time in 30 minute increments only.
        public let weeklyMaintenanceWindowStart: String?

        @inlinable
        public init(airflowConfigurationOptions: [String: String]? = nil, airflowVersion: String? = nil, dagS3Path: String, endpointManagement: EndpointManagement? = nil, environmentClass: String? = nil, executionRoleArn: String, kmsKey: String? = nil, loggingConfiguration: LoggingConfigurationInput? = nil, maxWebservers: Int? = nil, maxWorkers: Int? = nil, minWebservers: Int? = nil, minWorkers: Int? = nil, name: String, networkConfiguration: NetworkConfiguration, pluginsS3ObjectVersion: String? = nil, pluginsS3Path: String? = nil, requirementsS3ObjectVersion: String? = nil, requirementsS3Path: String? = nil, schedulers: Int? = nil, sourceBucketArn: String, startupScriptS3ObjectVersion: String? = nil, startupScriptS3Path: String? = nil, tags: [String: String]? = nil, webserverAccessMode: WebserverAccessMode? = nil, weeklyMaintenanceWindowStart: String? = nil) {
            self.airflowConfigurationOptions = airflowConfigurationOptions
            self.airflowVersion = airflowVersion
            self.dagS3Path = dagS3Path
            self.endpointManagement = endpointManagement
            self.environmentClass = environmentClass
            self.executionRoleArn = executionRoleArn
            self.kmsKey = kmsKey
            self.loggingConfiguration = loggingConfiguration
            self.maxWebservers = maxWebservers
            self.maxWorkers = maxWorkers
            self.minWebservers = minWebservers
            self.minWorkers = minWorkers
            self.name = name
            self.networkConfiguration = networkConfiguration
            self.pluginsS3ObjectVersion = pluginsS3ObjectVersion
            self.pluginsS3Path = pluginsS3Path
            self.requirementsS3ObjectVersion = requirementsS3ObjectVersion
            self.requirementsS3Path = requirementsS3Path
            self.schedulers = schedulers
            self.sourceBucketArn = sourceBucketArn
            self.startupScriptS3ObjectVersion = startupScriptS3ObjectVersion
            self.startupScriptS3Path = startupScriptS3Path
            self.tags = tags
            self.webserverAccessMode = webserverAccessMode
            self.weeklyMaintenanceWindowStart = weeklyMaintenanceWindowStart
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encodeIfPresent(self.airflowConfigurationOptions, forKey: .airflowConfigurationOptions)
            try container.encodeIfPresent(self.airflowVersion, forKey: .airflowVersion)
            try container.encode(self.dagS3Path, forKey: .dagS3Path)
            try container.encodeIfPresent(self.endpointManagement, forKey: .endpointManagement)
            try container.encodeIfPresent(self.environmentClass, forKey: .environmentClass)
            try container.encode(self.executionRoleArn, forKey: .executionRoleArn)
            try container.encodeIfPresent(self.kmsKey, forKey: .kmsKey)
            try container.encodeIfPresent(self.loggingConfiguration, forKey: .loggingConfiguration)
            try container.encodeIfPresent(self.maxWebservers, forKey: .maxWebservers)
            try container.encodeIfPresent(self.maxWorkers, forKey: .maxWorkers)
            try container.encodeIfPresent(self.minWebservers, forKey: .minWebservers)
            try container.encodeIfPresent(self.minWorkers, forKey: .minWorkers)
            request.encodePath(self.name, key: "Name")
            try container.encode(self.networkConfiguration, forKey: .networkConfiguration)
            try container.encodeIfPresent(self.pluginsS3ObjectVersion, forKey: .pluginsS3ObjectVersion)
            try container.encodeIfPresent(self.pluginsS3Path, forKey: .pluginsS3Path)
            try container.encodeIfPresent(self.requirementsS3ObjectVersion, forKey: .requirementsS3ObjectVersion)
            try container.encodeIfPresent(self.requirementsS3Path, forKey: .requirementsS3Path)
            try container.encodeIfPresent(self.schedulers, forKey: .schedulers)
            try container.encode(self.sourceBucketArn, forKey: .sourceBucketArn)
            try container.encodeIfPresent(self.startupScriptS3ObjectVersion, forKey: .startupScriptS3ObjectVersion)
            try container.encodeIfPresent(self.startupScriptS3Path, forKey: .startupScriptS3Path)
            try container.encodeIfPresent(self.tags, forKey: .tags)
            try container.encodeIfPresent(self.webserverAccessMode, forKey: .webserverAccessMode)
            try container.encodeIfPresent(self.weeklyMaintenanceWindowStart, forKey: .weeklyMaintenanceWindowStart)
        }

        public func validate(name: String) throws {
            try self.airflowConfigurationOptions?.forEach {
                try validate($0.key, name: "airflowConfigurationOptions.key", parent: name, max: 64)
                try validate($0.key, name: "airflowConfigurationOptions.key", parent: name, min: 1)
                try validate($0.key, name: "airflowConfigurationOptions.key", parent: name, pattern: "^[a-z]+([a-z0-9._]*[a-z0-9_]+)?$")
                try validate($0.value, name: "airflowConfigurationOptions[\"\($0.key)\"]", parent: name, max: 65536)
                try validate($0.value, name: "airflowConfigurationOptions[\"\($0.key)\"]", parent: name, min: 1)
                try validate($0.value, name: "airflowConfigurationOptions[\"\($0.key)\"]", parent: name, pattern: "^[ -~]+$")
            }
            try self.validate(self.airflowVersion, name: "airflowVersion", parent: name, max: 32)
            try self.validate(self.airflowVersion, name: "airflowVersion", parent: name, min: 1)
            try self.validate(self.airflowVersion, name: "airflowVersion", parent: name, pattern: "^[0-9a-z.]+$")
            try self.validate(self.dagS3Path, name: "dagS3Path", parent: name, max: 1024)
            try self.validate(self.dagS3Path, name: "dagS3Path", parent: name, min: 1)
            try self.validate(self.dagS3Path, name: "dagS3Path", parent: name, pattern: ".*")
            try self.validate(self.environmentClass, name: "environmentClass", parent: name, max: 1024)
            try self.validate(self.environmentClass, name: "environmentClass", parent: name, min: 1)
            try self.validate(self.executionRoleArn, name: "executionRoleArn", parent: name, max: 1224)
            try self.validate(self.executionRoleArn, name: "executionRoleArn", parent: name, min: 1)
            try self.validate(self.executionRoleArn, name: "executionRoleArn", parent: name, pattern: "^arn:aws(-[a-z]+)?:iam::\\d{12}:role/?[a-zA-Z_0-9+=,.@\\-_/]+$")
            try self.validate(self.kmsKey, name: "kmsKey", parent: name, max: 1224)
            try self.validate(self.kmsKey, name: "kmsKey", parent: name, min: 1)
            try self.validate(self.kmsKey, name: "kmsKey", parent: name, pattern: "^(((arn:aws(-[a-z]+)?:kms:[a-z]{2}-[a-z]+-\\d:\\d+:)?key\\/)?[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|(arn:aws(-[a-z]+)?:kms:[a-z]{2}-[a-z]+-\\d:\\d+:)?alias/.+)$")
            try self.validate(self.maxWebservers, name: "maxWebservers", parent: name, min: 1)
            try self.validate(self.maxWorkers, name: "maxWorkers", parent: name, min: 1)
            try self.validate(self.minWebservers, name: "minWebservers", parent: name, min: 1)
            try self.validate(self.minWorkers, name: "minWorkers", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, max: 80)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[a-zA-Z][0-9a-zA-Z-_]*$")
            try self.networkConfiguration.validate(name: "\(name).networkConfiguration")
            try self.validate(self.pluginsS3ObjectVersion, name: "pluginsS3ObjectVersion", parent: name, max: 1024)
            try self.validate(self.pluginsS3ObjectVersion, name: "pluginsS3ObjectVersion", parent: name, min: 1)
            try self.validate(self.pluginsS3Path, name: "pluginsS3Path", parent: name, max: 1024)
            try self.validate(self.pluginsS3Path, name: "pluginsS3Path", parent: name, min: 1)
            try self.validate(self.pluginsS3Path, name: "pluginsS3Path", parent: name, pattern: ".*")
            try self.validate(self.requirementsS3ObjectVersion, name: "requirementsS3ObjectVersion", parent: name, max: 1024)
            try self.validate(self.requirementsS3ObjectVersion, name: "requirementsS3ObjectVersion", parent: name, min: 1)
            try self.validate(self.requirementsS3Path, name: "requirementsS3Path", parent: name, max: 1024)
            try self.validate(self.requirementsS3Path, name: "requirementsS3Path", parent: name, min: 1)
            try self.validate(self.requirementsS3Path, name: "requirementsS3Path", parent: name, pattern: ".*")
            try self.validate(self.schedulers, name: "schedulers", parent: name, max: 5)
            try self.validate(self.sourceBucketArn, name: "sourceBucketArn", parent: name, max: 1224)
            try self.validate(self.sourceBucketArn, name: "sourceBucketArn", parent: name, min: 1)
            try self.validate(self.sourceBucketArn, name: "sourceBucketArn", parent: name, pattern: "^arn:aws(-[a-z]+)?:s3:::[a-z0-9.\\-]+$")
            try self.validate(self.startupScriptS3ObjectVersion, name: "startupScriptS3ObjectVersion", parent: name, max: 1024)
            try self.validate(self.startupScriptS3ObjectVersion, name: "startupScriptS3ObjectVersion", parent: name, min: 1)
            try self.validate(self.startupScriptS3Path, name: "startupScriptS3Path", parent: name, max: 1024)
            try self.validate(self.startupScriptS3Path, name: "startupScriptS3Path", parent: name, min: 1)
            try self.validate(self.startupScriptS3Path, name: "startupScriptS3Path", parent: name, pattern: ".*")
            try self.tags?.forEach {
                try validate($0.key, name: "tags.key", parent: name, max: 128)
                try validate($0.key, name: "tags.key", parent: name, min: 1)
                try validate($0.key, name: "tags.key", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$")
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, max: 256)
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, min: 1)
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 50)
            try self.validate(self.tags, name: "tags", parent: name, min: 1)
            try self.validate(self.weeklyMaintenanceWindowStart, name: "weeklyMaintenanceWindowStart", parent: name, max: 9)
            try self.validate(self.weeklyMaintenanceWindowStart, name: "weeklyMaintenanceWindowStart", parent: name, min: 1)
            try self.validate(self.weeklyMaintenanceWindowStart, name: "weeklyMaintenanceWindowStart", parent: name, pattern: "(MON|TUE|WED|THU|FRI|SAT|SUN):([01]\\d|2[0-3]):(00|30)")
        }

        private enum CodingKeys: String, CodingKey {
            case airflowConfigurationOptions = "AirflowConfigurationOptions"
            case airflowVersion = "AirflowVersion"
            case dagS3Path = "DagS3Path"
            case endpointManagement = "EndpointManagement"
            case environmentClass = "EnvironmentClass"
            case executionRoleArn = "ExecutionRoleArn"
            case kmsKey = "KmsKey"
            case loggingConfiguration = "LoggingConfiguration"
            case maxWebservers = "MaxWebservers"
            case maxWorkers = "MaxWorkers"
            case minWebservers = "MinWebservers"
            case minWorkers = "MinWorkers"
            case networkConfiguration = "NetworkConfiguration"
            case pluginsS3ObjectVersion = "PluginsS3ObjectVersion"
            case pluginsS3Path = "PluginsS3Path"
            case requirementsS3ObjectVersion = "RequirementsS3ObjectVersion"
            case requirementsS3Path = "RequirementsS3Path"
            case schedulers = "Schedulers"
            case sourceBucketArn = "SourceBucketArn"
            case startupScriptS3ObjectVersion = "StartupScriptS3ObjectVersion"
            case startupScriptS3Path = "StartupScriptS3Path"
            case tags = "Tags"
            case webserverAccessMode = "WebserverAccessMode"
            case weeklyMaintenanceWindowStart = "WeeklyMaintenanceWindowStart"
        }
    }

    public struct CreateEnvironmentOutput: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) returned in the response for the environment.
        public let arn: String?

        @inlinable
        public init(arn: String? = nil) {
            self.arn = arn
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "Arn"
        }
    }

    public struct CreateWebLoginTokenRequest: AWSEncodableShape {
        /// The name of the Amazon MWAA environment. For example, MyMWAAEnvironment.
        public let name: String

        @inlinable
        public init(name: String) {
            self.name = name
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.name, key: "Name")
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 80)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[a-zA-Z][0-9a-zA-Z-_]*$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct CreateWebLoginTokenResponse: AWSDecodableShape {
        /// The user name of the Apache Airflow identity creating the web login token.
        public let airflowIdentity: String?
        /// The name of the IAM identity creating the web login token. This might be an IAM user, or an assumed or federated identity. For example, assumed-role/Admin/your-name.
        public let iamIdentity: String?
        /// The Airflow web server hostname for the environment.
        public let webServerHostname: String?
        /// An Airflow web server login token.
        public let webToken: String?

        @inlinable
        public init(airflowIdentity: String? = nil, iamIdentity: String? = nil, webServerHostname: String? = nil, webToken: String? = nil) {
            self.airflowIdentity = airflowIdentity
            self.iamIdentity = iamIdentity
            self.webServerHostname = webServerHostname
            self.webToken = webToken
        }

        private enum CodingKeys: String, CodingKey {
            case airflowIdentity = "AirflowIdentity"
            case iamIdentity = "IamIdentity"
            case webServerHostname = "WebServerHostname"
            case webToken = "WebToken"
        }
    }

    public struct DeleteEnvironmentInput: AWSEncodableShape {
        /// The name of the Amazon MWAA environment. For example, MyMWAAEnvironment.
        public let name: String

        @inlinable
        public init(name: String) {
            self.name = name
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.name, key: "Name")
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 80)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[a-zA-Z][0-9a-zA-Z-_]*$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteEnvironmentOutput: AWSDecodableShape {
        public init() {}
    }

    public struct Dimension: AWSEncodableShape {
        ///  Internal only. The name of the dimension.
        public let name: String
        ///  Internal only. The value of the dimension.
        public let value: String

        @inlinable
        public init(name: String, value: String) {
            self.name = name
            self.value = value
        }

        private enum CodingKeys: String, CodingKey {
            case name = "Name"
            case value = "Value"
        }
    }

    public struct Environment: AWSDecodableShape {
        /// A list of key-value pairs containing the Apache Airflow configuration options attached to your environment. For more information, see Apache Airflow configuration options.
        public let airflowConfigurationOptions: [String: String]?
        /// The Apache Airflow version on your environment. Valid values: 1.10.12, 2.0.2, 2.2.2, 2.4.3, 2.5.1, 2.6.3, 2.7.2, 2.8.1, 2.9.2, 2.10.1, and 2.10.3.
        public let airflowVersion: String?
        /// The Amazon Resource Name (ARN) of the Amazon MWAA environment.
        public let arn: String?
        /// The queue ARN for the environment's Celery Executor. Amazon MWAA uses a Celery Executor to distribute tasks across multiple workers. When you create an environment in a shared VPC, you must provide access to the Celery Executor queue from your VPC.
        public let celeryExecutorQueue: String?
        /// The day and time the environment was created.
        public let createdAt: Date?
        /// The relative path to the DAGs folder in your Amazon S3 bucket. For example, s3://mwaa-environment/dags. For more information, see Adding or updating DAGs.
        public let dagS3Path: String?
        /// The VPC endpoint for the environment's Amazon RDS database.
        public let databaseVpcEndpointService: String?
        /// Defines whether the VPC endpoints configured for the environment are created, and managed, by the customer or by Amazon MWAA. If set to SERVICE, Amazon MWAA will create and manage the required VPC endpoints in your VPC. If set to CUSTOMER, you must create, and manage, the VPC endpoints in your VPC.
        public let endpointManagement: EndpointManagement?
        /// The environment class type. Valid values: mw1.micro, mw1.small, mw1.medium, mw1.large, mw1.xlarge, and mw1.2xlarge. For more information, see Amazon MWAA environment class.
        public let environmentClass: String?
        /// The Amazon Resource Name (ARN) of the execution role in IAM that allows MWAA to access Amazon Web Services resources in your environment. For example, arn:aws:iam::123456789:role/my-execution-role. For more information, see Amazon MWAA Execution role.
        public let executionRoleArn: String?
        /// The KMS encryption key used to encrypt the data in your environment.
        public let kmsKey: String?
        /// The status of the last update on the environment.
        public let lastUpdate: LastUpdate?
        /// The Apache Airflow logs published to CloudWatch Logs.
        public let loggingConfiguration: LoggingConfiguration?
        ///  The maximum number of web servers that you want to run in your environment. Amazon MWAA scales the number of Apache Airflow web servers up to the number you specify for MaxWebservers when you interact with your Apache Airflow environment using Apache Airflow REST API, or the Apache Airflow CLI. For example, in scenarios where your workload requires network calls to the Apache Airflow REST API with a high transaction-per-second (TPS) rate, Amazon MWAA will increase the number of web servers up to the number set in MaxWebserers. As TPS rates decrease Amazon MWAA disposes of the additional web servers, and scales down to the number set in MinxWebserers.  Valid values: For environments larger than mw1.micro, accepts values from 2 to 5. Defaults to 2 for all environment sizes except mw1.micro, which defaults to 1.
        public let maxWebservers: Int?
        /// The maximum number of workers that run in your environment. For example, 20.
        public let maxWorkers: Int?
        ///  The minimum number of web servers that you want to run in your environment. Amazon MWAA scales the number of Apache Airflow web servers up to the number you specify for MaxWebservers when you interact with your Apache Airflow environment using Apache Airflow REST API, or the Apache Airflow CLI. As the transaction-per-second rate, and the network load, decrease, Amazon MWAA disposes of the additional web servers, and scales down to the number set in MinxWebserers.  Valid values: For environments larger than mw1.micro, accepts values from 2 to 5. Defaults to 2 for all environment sizes except mw1.micro, which defaults to 1.
        public let minWebservers: Int?
        /// The minimum number of workers that run in your environment. For example, 2.
        public let minWorkers: Int?
        /// The name of the Amazon MWAA environment. For example, MyMWAAEnvironment.
        public let name: String?
        /// Describes the VPC networking components used to secure and enable network traffic between the Amazon Web Services resources for your environment. For more information, see About networking on Amazon MWAA.
        public let networkConfiguration: NetworkConfiguration?
        /// The version of the plugins.zip file in your Amazon S3 bucket. You must specify the version ID that Amazon S3 assigns to the file.  Version IDs are Unicode, UTF-8 encoded, URL-ready, opaque strings that are no more than 1,024 bytes long. The following is an example:   3sL4kqtJlcpXroDTDmJ+rmSpXd3dIbrHY+MTRCxf3vjVBH40Nr8X8gdRQBpUMLUo  For more information, see Installing custom plugins.
        public let pluginsS3ObjectVersion: String?
        /// The relative path to the file in your Amazon S3 bucket. For example, s3://mwaa-environment/plugins.zip. For more information, see Installing custom plugins.
        public let pluginsS3Path: String?
        /// The version of the requirements.txt  file on your Amazon S3 bucket. You must specify the version ID that Amazon S3 assigns to the file.  Version IDs are Unicode, UTF-8 encoded, URL-ready, opaque strings that are no more than 1,024 bytes long. The following is an example:   3sL4kqtJlcpXroDTDmJ+rmSpXd3dIbrHY+MTRCxf3vjVBH40Nr8X8gdRQBpUMLUo   For more information, see Installing Python dependencies.
        public let requirementsS3ObjectVersion: String?
        /// The relative path to the requirements.txt file in your Amazon S3 bucket. For example, s3://mwaa-environment/requirements.txt. For more information, see Installing Python dependencies.
        public let requirementsS3Path: String?
        /// The number of Apache Airflow schedulers that run in your Amazon MWAA environment.
        public let schedulers: Int?
        /// The Amazon Resource Name (ARN) for the service-linked role of the environment. For more information, see Amazon MWAA Service-linked role.
        public let serviceRoleArn: String?
        /// The Amazon Resource Name (ARN) of the Amazon S3 bucket where your DAG code and supporting files are stored. For example, arn:aws:s3:::my-airflow-bucket-unique-name. For more information, see Create an Amazon S3 bucket for Amazon MWAA.
        public let sourceBucketArn: String?
        /// The version of the startup shell script in your Amazon S3 bucket. You must specify the version ID that Amazon S3 assigns to the file.  Version IDs are Unicode, UTF-8 encoded, URL-ready, opaque strings that are no more than 1,024 bytes long. The following is an example:   3sL4kqtJlcpXroDTDmJ+rmSpXd3dIbrHY+MTRCxf3vjVBH40Nr8X8gdRQBpUMLUo   For more information, see Using a startup script.
        public let startupScriptS3ObjectVersion: String?
        /// The relative path to the startup shell script in your Amazon S3 bucket. For example, s3://mwaa-environment/startup.sh.  Amazon MWAA runs the script as your environment starts, and before running the Apache Airflow process. You can use this script to install dependencies, modify Apache Airflow configuration options, and set environment variables. For more information, see Using a startup script.
        public let startupScriptS3Path: String?
        /// The status of the Amazon MWAA environment. Valid values:    CREATING - Indicates the request to create the environment is in progress.    CREATING_SNAPSHOT - Indicates the request to update environment details, or upgrade the environment version, is in progress and Amazon MWAA is creating a storage volume snapshot of the Amazon RDS database cluster associated with the environment. A database snapshot is a backup created at a specific point in time. Amazon MWAA uses snapshots to recover environment metadata if the process to update or upgrade an environment fails.    CREATE_FAILED - Indicates the request to create the environment failed, and the environment could not be created.    AVAILABLE - Indicates the request was successful and the environment is ready to use.    PENDING - Indicates the request was successful, but the process to create the environment is paused until you create the required VPC endpoints in your VPC. After you create the VPC endpoints, the process resumes.    UPDATING - Indicates the request to update the environment is in progress.    ROLLING_BACK - Indicates the request to update environment details, or upgrade the environment version, failed and Amazon MWAA is restoring the environment using the latest storage volume snapshot.    DELETING - Indicates the request to delete the environment is in progress.    DELETED - Indicates the request to delete the environment is complete, and the environment has been deleted.    UNAVAILABLE - Indicates the request failed, but the environment did not return to its previous state and is not stable.    UPDATE_FAILED - Indicates the request to update the environment failed, and the environment was restored to its previous state successfully and is ready to use.    MAINTENANCE - Indicates that the environment is undergoing maintenance. Depending on the type of work Amazon MWAA is performing, your environment might become unavailable during this process. After all operations are done, your environment will return to its status prior to mainteneace operations.    We recommend reviewing our troubleshooting guide for a list of common errors and their solutions. For more information, see Amazon MWAA troubleshooting.
        public let status: EnvironmentStatus?
        /// The key-value tag pairs associated to your environment. For example, "Environment": "Staging". For more information, see Tagging Amazon Web Services resources.
        public let tags: [String: String]?
        /// The Apache Airflow web server access mode. For more information, see Apache Airflow access modes.
        public let webserverAccessMode: WebserverAccessMode?
        /// The Apache Airflow web server host name for the Amazon MWAA environment. For more information, see Accessing the Apache Airflow UI.
        public let webserverUrl: String?
        /// The VPC endpoint for the environment's web server.
        public let webserverVpcEndpointService: String?
        /// The day and time of the week in Coordinated Universal Time (UTC) 24-hour standard time that weekly maintenance updates are scheduled. For example: TUE:03:30.
        public let weeklyMaintenanceWindowStart: String?

        @inlinable
        public init(airflowConfigurationOptions: [String: String]? = nil, airflowVersion: String? = nil, arn: String? = nil, celeryExecutorQueue: String? = nil, createdAt: Date? = nil, dagS3Path: String? = nil, databaseVpcEndpointService: String? = nil, endpointManagement: EndpointManagement? = nil, environmentClass: String? = nil, executionRoleArn: String? = nil, kmsKey: String? = nil, lastUpdate: LastUpdate? = nil, loggingConfiguration: LoggingConfiguration? = nil, maxWebservers: Int? = nil, maxWorkers: Int? = nil, minWebservers: Int? = nil, minWorkers: Int? = nil, name: String? = nil, networkConfiguration: NetworkConfiguration? = nil, pluginsS3ObjectVersion: String? = nil, pluginsS3Path: String? = nil, requirementsS3ObjectVersion: String? = nil, requirementsS3Path: String? = nil, schedulers: Int? = nil, serviceRoleArn: String? = nil, sourceBucketArn: String? = nil, startupScriptS3ObjectVersion: String? = nil, startupScriptS3Path: String? = nil, status: EnvironmentStatus? = nil, tags: [String: String]? = nil, webserverAccessMode: WebserverAccessMode? = nil, webserverUrl: String? = nil, webserverVpcEndpointService: String? = nil, weeklyMaintenanceWindowStart: String? = nil) {
            self.airflowConfigurationOptions = airflowConfigurationOptions
            self.airflowVersion = airflowVersion
            self.arn = arn
            self.celeryExecutorQueue = celeryExecutorQueue
            self.createdAt = createdAt
            self.dagS3Path = dagS3Path
            self.databaseVpcEndpointService = databaseVpcEndpointService
            self.endpointManagement = endpointManagement
            self.environmentClass = environmentClass
            self.executionRoleArn = executionRoleArn
            self.kmsKey = kmsKey
            self.lastUpdate = lastUpdate
            self.loggingConfiguration = loggingConfiguration
            self.maxWebservers = maxWebservers
            self.maxWorkers = maxWorkers
            self.minWebservers = minWebservers
            self.minWorkers = minWorkers
            self.name = name
            self.networkConfiguration = networkConfiguration
            self.pluginsS3ObjectVersion = pluginsS3ObjectVersion
            self.pluginsS3Path = pluginsS3Path
            self.requirementsS3ObjectVersion = requirementsS3ObjectVersion
            self.requirementsS3Path = requirementsS3Path
            self.schedulers = schedulers
            self.serviceRoleArn = serviceRoleArn
            self.sourceBucketArn = sourceBucketArn
            self.startupScriptS3ObjectVersion = startupScriptS3ObjectVersion
            self.startupScriptS3Path = startupScriptS3Path
            self.status = status
            self.tags = tags
            self.webserverAccessMode = webserverAccessMode
            self.webserverUrl = webserverUrl
            self.webserverVpcEndpointService = webserverVpcEndpointService
            self.weeklyMaintenanceWindowStart = weeklyMaintenanceWindowStart
        }

        private enum CodingKeys: String, CodingKey {
            case airflowConfigurationOptions = "AirflowConfigurationOptions"
            case airflowVersion = "AirflowVersion"
            case arn = "Arn"
            case celeryExecutorQueue = "CeleryExecutorQueue"
            case createdAt = "CreatedAt"
            case dagS3Path = "DagS3Path"
            case databaseVpcEndpointService = "DatabaseVpcEndpointService"
            case endpointManagement = "EndpointManagement"
            case environmentClass = "EnvironmentClass"
            case executionRoleArn = "ExecutionRoleArn"
            case kmsKey = "KmsKey"
            case lastUpdate = "LastUpdate"
            case loggingConfiguration = "LoggingConfiguration"
            case maxWebservers = "MaxWebservers"
            case maxWorkers = "MaxWorkers"
            case minWebservers = "MinWebservers"
            case minWorkers = "MinWorkers"
            case name = "Name"
            case networkConfiguration = "NetworkConfiguration"
            case pluginsS3ObjectVersion = "PluginsS3ObjectVersion"
            case pluginsS3Path = "PluginsS3Path"
            case requirementsS3ObjectVersion = "RequirementsS3ObjectVersion"
            case requirementsS3Path = "RequirementsS3Path"
            case schedulers = "Schedulers"
            case serviceRoleArn = "ServiceRoleArn"
            case sourceBucketArn = "SourceBucketArn"
            case startupScriptS3ObjectVersion = "StartupScriptS3ObjectVersion"
            case startupScriptS3Path = "StartupScriptS3Path"
            case status = "Status"
            case tags = "Tags"
            case webserverAccessMode = "WebserverAccessMode"
            case webserverUrl = "WebserverUrl"
            case webserverVpcEndpointService = "WebserverVpcEndpointService"
            case weeklyMaintenanceWindowStart = "WeeklyMaintenanceWindowStart"
        }
    }

    public struct GetEnvironmentInput: AWSEncodableShape {
        /// The name of the Amazon MWAA environment. For example, MyMWAAEnvironment.
        public let name: String

        @inlinable
        public init(name: String) {
            self.name = name
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.name, key: "Name")
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 80)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[a-zA-Z][0-9a-zA-Z-_]*$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetEnvironmentOutput: AWSDecodableShape {
        /// An object containing all available details about the environment.
        public let environment: Environment?

        @inlinable
        public init(environment: Environment? = nil) {
            self.environment = environment
        }

        private enum CodingKeys: String, CodingKey {
            case environment = "Environment"
        }
    }

    public struct InvokeRestApiRequest: AWSEncodableShape {
        /// The request body for the Apache Airflow REST API call, provided as a JSON object.
        public let body: AWSDocument?
        /// The HTTP method used for making Airflow REST API calls. For example, POST.
        public let method: RestApiMethod
        /// The name of the Amazon MWAA environment. For example, MyMWAAEnvironment.
        public let name: String
        /// The Apache Airflow REST API endpoint path to be called. For example, /dags/123456/clearTaskInstances. For more information, see Apache Airflow API
        public let path: String
        /// Query parameters to be included in the Apache Airflow REST API call, provided as a JSON object.
        public let queryParameters: AWSDocument?

        @inlinable
        public init(body: AWSDocument? = nil, method: RestApiMethod, name: String, path: String, queryParameters: AWSDocument? = nil) {
            self.body = body
            self.method = method
            self.name = name
            self.path = path
            self.queryParameters = queryParameters
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encodeIfPresent(self.body, forKey: .body)
            try container.encode(self.method, forKey: .method)
            request.encodePath(self.name, key: "Name")
            try container.encode(self.path, forKey: .path)
            try container.encodeIfPresent(self.queryParameters, forKey: .queryParameters)
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 80)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[a-zA-Z][0-9a-zA-Z-_]*$")
            try self.validate(self.path, name: "path", parent: name, max: 64)
            try self.validate(self.path, name: "path", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case body = "Body"
            case method = "Method"
            case path = "Path"
            case queryParameters = "QueryParameters"
        }
    }

    public struct InvokeRestApiResponse: AWSDecodableShape {
        /// The response data from the Apache Airflow REST API call, provided as a JSON object.
        public let restApiResponse: AWSDocument?
        /// The HTTP status code returned by the Apache Airflow REST API call.
        public let restApiStatusCode: Int?

        @inlinable
        public init(restApiResponse: AWSDocument? = nil, restApiStatusCode: Int? = nil) {
            self.restApiResponse = restApiResponse
            self.restApiStatusCode = restApiStatusCode
        }

        private enum CodingKeys: String, CodingKey {
            case restApiResponse = "RestApiResponse"
            case restApiStatusCode = "RestApiStatusCode"
        }
    }

    public struct LastUpdate: AWSDecodableShape {
        /// The day and time of the last update on the environment.
        public let createdAt: Date?
        /// The error that was encountered during the last update of the environment.
        public let error: UpdateError?
        /// The source of the last update to the environment. Includes internal processes by Amazon MWAA, such as an environment maintenance update.
        public let source: String?
        /// The status of the last update on the environment.
        public let status: UpdateStatus?
        /// The worker replacement strategy used in the last update of the environment.
        public let workerReplacementStrategy: WorkerReplacementStrategy?

        @inlinable
        public init(createdAt: Date? = nil, error: UpdateError? = nil, source: String? = nil, status: UpdateStatus? = nil, workerReplacementStrategy: WorkerReplacementStrategy? = nil) {
            self.createdAt = createdAt
            self.error = error
            self.source = source
            self.status = status
            self.workerReplacementStrategy = workerReplacementStrategy
        }

        private enum CodingKeys: String, CodingKey {
            case createdAt = "CreatedAt"
            case error = "Error"
            case source = "Source"
            case status = "Status"
            case workerReplacementStrategy = "WorkerReplacementStrategy"
        }
    }

    public struct ListEnvironmentsInput: AWSEncodableShape {
        /// The maximum number of results to retrieve per page. For example, 5 environments per page.
        public let maxResults: Int?
        /// Retrieves the next page of the results.
        public let nextToken: String?

        @inlinable
        public init(maxResults: Int? = nil, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.maxResults, key: "MaxResults")
            request.encodeQuery(self.nextToken, key: "NextToken")
        }

        public func validate(name: String) throws {
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2048)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListEnvironmentsOutput: AWSDecodableShape {
        /// Returns a list of Amazon MWAA environments.
        public let environments: [String]
        /// Retrieves the next page of the results.
        public let nextToken: String?

        @inlinable
        public init(environments: [String], nextToken: String? = nil) {
            self.environments = environments
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case environments = "Environments"
            case nextToken = "NextToken"
        }
    }

    public struct ListTagsForResourceInput: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the Amazon MWAA environment. For example, arn:aws:airflow:us-east-1:123456789012:environment/MyMWAAEnvironment.
        public let resourceArn: String

        @inlinable
        public init(resourceArn: String) {
            self.resourceArn = resourceArn
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.resourceArn, key: "ResourceArn")
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, max: 1224)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, min: 1)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, pattern: "^arn:aws(-[a-z]+)?:airflow:[a-z0-9\\-]+:\\d{12}:environment/\\w+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListTagsForResourceOutput: AWSDecodableShape {
        /// The key-value tag pairs associated to your environment. For more information, see Tagging Amazon Web Services resources.
        public let tags: [String: String]?

        @inlinable
        public init(tags: [String: String]? = nil) {
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case tags = "Tags"
        }
    }

    public struct LoggingConfiguration: AWSDecodableShape {
        /// The Airflow DAG processing logs published to CloudWatch Logs and the log level.
        public let dagProcessingLogs: ModuleLoggingConfiguration?
        /// The Airflow scheduler logs published to CloudWatch Logs and the log level.
        public let schedulerLogs: ModuleLoggingConfiguration?
        /// The Airflow task logs published to CloudWatch Logs and the log level.
        public let taskLogs: ModuleLoggingConfiguration?
        /// The Airflow web server logs published to CloudWatch Logs and the log level.
        public let webserverLogs: ModuleLoggingConfiguration?
        /// The Airflow worker logs published to CloudWatch Logs and the log level.
        public let workerLogs: ModuleLoggingConfiguration?

        @inlinable
        public init(dagProcessingLogs: ModuleLoggingConfiguration? = nil, schedulerLogs: ModuleLoggingConfiguration? = nil, taskLogs: ModuleLoggingConfiguration? = nil, webserverLogs: ModuleLoggingConfiguration? = nil, workerLogs: ModuleLoggingConfiguration? = nil) {
            self.dagProcessingLogs = dagProcessingLogs
            self.schedulerLogs = schedulerLogs
            self.taskLogs = taskLogs
            self.webserverLogs = webserverLogs
            self.workerLogs = workerLogs
        }

        private enum CodingKeys: String, CodingKey {
            case dagProcessingLogs = "DagProcessingLogs"
            case schedulerLogs = "SchedulerLogs"
            case taskLogs = "TaskLogs"
            case webserverLogs = "WebserverLogs"
            case workerLogs = "WorkerLogs"
        }
    }

    public struct LoggingConfigurationInput: AWSEncodableShape {
        /// Publishes Airflow DAG processing logs to CloudWatch Logs.
        public let dagProcessingLogs: ModuleLoggingConfigurationInput?
        /// Publishes Airflow scheduler logs to CloudWatch Logs.
        public let schedulerLogs: ModuleLoggingConfigurationInput?
        /// Publishes Airflow task logs to CloudWatch Logs.
        public let taskLogs: ModuleLoggingConfigurationInput?
        /// Publishes Airflow web server logs to CloudWatch Logs.
        public let webserverLogs: ModuleLoggingConfigurationInput?
        /// Publishes Airflow worker logs to CloudWatch Logs.
        public let workerLogs: ModuleLoggingConfigurationInput?

        @inlinable
        public init(dagProcessingLogs: ModuleLoggingConfigurationInput? = nil, schedulerLogs: ModuleLoggingConfigurationInput? = nil, taskLogs: ModuleLoggingConfigurationInput? = nil, webserverLogs: ModuleLoggingConfigurationInput? = nil, workerLogs: ModuleLoggingConfigurationInput? = nil) {
            self.dagProcessingLogs = dagProcessingLogs
            self.schedulerLogs = schedulerLogs
            self.taskLogs = taskLogs
            self.webserverLogs = webserverLogs
            self.workerLogs = workerLogs
        }

        private enum CodingKeys: String, CodingKey {
            case dagProcessingLogs = "DagProcessingLogs"
            case schedulerLogs = "SchedulerLogs"
            case taskLogs = "TaskLogs"
            case webserverLogs = "WebserverLogs"
            case workerLogs = "WorkerLogs"
        }
    }

    public struct MetricDatum: AWSEncodableShape {
        ///  Internal only. The dimensions associated with the metric.
        public let dimensions: [Dimension]?
        ///  Internal only. The name of the metric.
        public let metricName: String
        ///  Internal only. The statistical values for the metric.
        public let statisticValues: StatisticSet?
        ///  Internal only. The time the metric data was received.
        public let timestamp: Date
        ///  Internal only. The unit used to store the metric.
        public let unit: Unit?
        ///  Internal only. The value for the metric.
        public let value: Double?

        @inlinable
        public init(dimensions: [Dimension]? = nil, metricName: String, statisticValues: StatisticSet? = nil, timestamp: Date, unit: Unit? = nil, value: Double? = nil) {
            self.dimensions = dimensions
            self.metricName = metricName
            self.statisticValues = statisticValues
            self.timestamp = timestamp
            self.unit = unit
            self.value = value
        }

        private enum CodingKeys: String, CodingKey {
            case dimensions = "Dimensions"
            case metricName = "MetricName"
            case statisticValues = "StatisticValues"
            case timestamp = "Timestamp"
            case unit = "Unit"
            case value = "Value"
        }
    }

    public struct ModuleLoggingConfiguration: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) for the CloudWatch Logs group where the Apache Airflow log type (e.g. DagProcessingLogs) is published. For example, arn:aws:logs:us-east-1:123456789012:log-group:airflow-MyMWAAEnvironment-MwaaEnvironment-DAGProcessing:*.
        public let cloudWatchLogGroupArn: String?
        /// Indicates whether the Apache Airflow log type (e.g. DagProcessingLogs) is enabled.
        public let enabled: Bool?
        /// The Apache Airflow log level for the log type (e.g. DagProcessingLogs).
        public let logLevel: LoggingLevel?

        @inlinable
        public init(cloudWatchLogGroupArn: String? = nil, enabled: Bool? = nil, logLevel: LoggingLevel? = nil) {
            self.cloudWatchLogGroupArn = cloudWatchLogGroupArn
            self.enabled = enabled
            self.logLevel = logLevel
        }

        private enum CodingKeys: String, CodingKey {
            case cloudWatchLogGroupArn = "CloudWatchLogGroupArn"
            case enabled = "Enabled"
            case logLevel = "LogLevel"
        }
    }

    public struct ModuleLoggingConfigurationInput: AWSEncodableShape {
        /// Indicates whether to enable the Apache Airflow log type (e.g. DagProcessingLogs).
        public let enabled: Bool
        /// Defines the Apache Airflow log level (e.g. INFO) to send to CloudWatch Logs.
        public let logLevel: LoggingLevel

        @inlinable
        public init(enabled: Bool, logLevel: LoggingLevel) {
            self.enabled = enabled
            self.logLevel = logLevel
        }

        private enum CodingKeys: String, CodingKey {
            case enabled = "Enabled"
            case logLevel = "LogLevel"
        }
    }

    public struct NetworkConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// A list of security group IDs. For more information, see Security in your VPC on Amazon MWAA.
        public let securityGroupIds: [String]?
        /// A list of subnet IDs. For more information, see About networking on Amazon MWAA.
        public let subnetIds: [String]?

        @inlinable
        public init(securityGroupIds: [String]? = nil, subnetIds: [String]? = nil) {
            self.securityGroupIds = securityGroupIds
            self.subnetIds = subnetIds
        }

        public func validate(name: String) throws {
            try self.securityGroupIds?.forEach {
                try validate($0, name: "securityGroupIds[]", parent: name, max: 1024)
                try validate($0, name: "securityGroupIds[]", parent: name, min: 1)
                try validate($0, name: "securityGroupIds[]", parent: name, pattern: "^sg-[a-zA-Z0-9\\-._]+$")
            }
            try self.validate(self.securityGroupIds, name: "securityGroupIds", parent: name, max: 5)
            try self.validate(self.securityGroupIds, name: "securityGroupIds", parent: name, min: 1)
            try self.subnetIds?.forEach {
                try validate($0, name: "subnetIds[]", parent: name, max: 1024)
                try validate($0, name: "subnetIds[]", parent: name, min: 1)
                try validate($0, name: "subnetIds[]", parent: name, pattern: "^subnet-[a-zA-Z0-9\\-._]+$")
            }
            try self.validate(self.subnetIds, name: "subnetIds", parent: name, max: 2)
            try self.validate(self.subnetIds, name: "subnetIds", parent: name, min: 2)
        }

        private enum CodingKeys: String, CodingKey {
            case securityGroupIds = "SecurityGroupIds"
            case subnetIds = "SubnetIds"
        }
    }

    public struct PublishMetricsInput: AWSEncodableShape {
        ///  Internal only. The name of the environment.
        public let environmentName: String
        ///  Internal only. Publishes metrics to Amazon CloudWatch. To learn more about the metrics published to Amazon CloudWatch, see Amazon MWAA performance metrics in Amazon CloudWatch.
        public let metricData: [MetricDatum]

        @inlinable
        public init(environmentName: String, metricData: [MetricDatum]) {
            self.environmentName = environmentName
            self.metricData = metricData
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.environmentName, key: "EnvironmentName")
            try container.encode(self.metricData, forKey: .metricData)
        }

        public func validate(name: String) throws {
            try self.validate(self.environmentName, name: "environmentName", parent: name, max: 80)
            try self.validate(self.environmentName, name: "environmentName", parent: name, min: 1)
            try self.validate(self.environmentName, name: "environmentName", parent: name, pattern: "^[a-zA-Z][0-9a-zA-Z-_]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case metricData = "MetricData"
        }
    }

    public struct PublishMetricsOutput: AWSDecodableShape {
        public init() {}
    }

    public struct RestApiClientException: AWSErrorShape {
        /// The error response data from the Apache Airflow REST API call, provided as a JSON object.
        public let restApiResponse: AWSDocument?
        /// The HTTP status code returned by the Apache Airflow REST API call.
        public let restApiStatusCode: Int?

        @inlinable
        public init(restApiResponse: AWSDocument? = nil, restApiStatusCode: Int? = nil) {
            self.restApiResponse = restApiResponse
            self.restApiStatusCode = restApiStatusCode
        }

        private enum CodingKeys: String, CodingKey {
            case restApiResponse = "RestApiResponse"
            case restApiStatusCode = "RestApiStatusCode"
        }
    }

    public struct RestApiServerException: AWSErrorShape {
        /// The error response data from the Apache Airflow REST API call, provided as a JSON object.
        public let restApiResponse: AWSDocument?
        /// The HTTP status code returned by the Apache Airflow REST API call.
        public let restApiStatusCode: Int?

        @inlinable
        public init(restApiResponse: AWSDocument? = nil, restApiStatusCode: Int? = nil) {
            self.restApiResponse = restApiResponse
            self.restApiStatusCode = restApiStatusCode
        }

        private enum CodingKeys: String, CodingKey {
            case restApiResponse = "RestApiResponse"
            case restApiStatusCode = "RestApiStatusCode"
        }
    }

    public struct StatisticSet: AWSEncodableShape {
        ///  Internal only. The maximum value of the sample set.
        public let maximum: Double?
        ///  Internal only. The minimum value of the sample set.
        public let minimum: Double?
        ///  Internal only. The number of samples used for the statistic set.
        public let sampleCount: Int?
        ///  Internal only. The sum of values for the sample set.
        public let sum: Double?

        @inlinable
        public init(maximum: Double? = nil, minimum: Double? = nil, sampleCount: Int? = nil, sum: Double? = nil) {
            self.maximum = maximum
            self.minimum = minimum
            self.sampleCount = sampleCount
            self.sum = sum
        }

        private enum CodingKeys: String, CodingKey {
            case maximum = "Maximum"
            case minimum = "Minimum"
            case sampleCount = "SampleCount"
            case sum = "Sum"
        }
    }

    public struct TagResourceInput: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the Amazon MWAA environment. For example, arn:aws:airflow:us-east-1:123456789012:environment/MyMWAAEnvironment.
        public let resourceArn: String
        /// The key-value tag pairs you want to associate to your environment. For example, "Environment": "Staging". For more information, see Tagging Amazon Web Services resources.
        public let tags: [String: String]

        @inlinable
        public init(resourceArn: String, tags: [String: String]) {
            self.resourceArn = resourceArn
            self.tags = tags
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.resourceArn, key: "ResourceArn")
            try container.encode(self.tags, forKey: .tags)
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, max: 1224)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, min: 1)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, pattern: "^arn:aws(-[a-z]+)?:airflow:[a-z0-9\\-]+:\\d{12}:environment/\\w+")
            try self.tags.forEach {
                try validate($0.key, name: "tags.key", parent: name, max: 128)
                try validate($0.key, name: "tags.key", parent: name, min: 1)
                try validate($0.key, name: "tags.key", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$")
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, max: 256)
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, min: 1)
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 50)
            try self.validate(self.tags, name: "tags", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case tags = "Tags"
        }
    }

    public struct TagResourceOutput: AWSDecodableShape {
        public init() {}
    }

    public struct UntagResourceInput: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the Amazon MWAA environment. For example, arn:aws:airflow:us-east-1:123456789012:environment/MyMWAAEnvironment.
        public let resourceArn: String
        /// The key-value tag pair you want to remove. For example, "Environment": "Staging".
        public let tagKeys: [String]

        @inlinable
        public init(resourceArn: String, tagKeys: [String]) {
            self.resourceArn = resourceArn
            self.tagKeys = tagKeys
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.resourceArn, key: "ResourceArn")
            request.encodeQuery(self.tagKeys, key: "tagKeys")
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, max: 1224)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, min: 1)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, pattern: "^arn:aws(-[a-z]+)?:airflow:[a-z0-9\\-]+:\\d{12}:environment/\\w+")
            try self.tagKeys.forEach {
                try validate($0, name: "tagKeys[]", parent: name, max: 128)
                try validate($0, name: "tagKeys[]", parent: name, min: 1)
                try validate($0, name: "tagKeys[]", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$")
            }
            try self.validate(self.tagKeys, name: "tagKeys", parent: name, max: 50)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct UntagResourceOutput: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateEnvironmentInput: AWSEncodableShape {
        /// A list of key-value pairs containing the Apache Airflow configuration options you want to attach to your environment. For more information, see Apache Airflow configuration options.
        public let airflowConfigurationOptions: [String: String]?
        /// The Apache Airflow version for your environment. To upgrade your environment, specify a newer version of Apache Airflow supported by Amazon MWAA. Before you upgrade an environment, make sure your requirements, DAGs, plugins, and other resources used in your workflows are compatible with the new Apache Airflow version. For more information about updating your resources, see Upgrading an Amazon MWAA environment. Valid values: 1.10.12, 2.0.2, 2.2.2, 2.4.3, 2.5.1, 2.6.3, 2.7.2, 2.8.1, 2.9.2, 2.10.1, and 2.10.3.
        public let airflowVersion: String?
        /// The relative path to the DAGs folder on your Amazon S3 bucket. For example, dags. For more information, see Adding or updating DAGs.
        public let dagS3Path: String?
        /// The environment class type. Valid values: mw1.micro, mw1.small, mw1.medium, mw1.large, mw1.xlarge, and mw1.2xlarge. For more information, see Amazon MWAA environment class.
        public let environmentClass: String?
        /// The Amazon Resource Name (ARN) of the execution role in IAM that allows MWAA to access Amazon Web Services resources in your environment. For example, arn:aws:iam::123456789:role/my-execution-role. For more information, see Amazon MWAA Execution role.
        public let executionRoleArn: String?
        /// The Apache Airflow log types to send to CloudWatch Logs.
        public let loggingConfiguration: LoggingConfigurationInput?
        ///  The maximum number of web servers that you want to run in your environment. Amazon MWAA scales the number of Apache Airflow web servers up to the number you specify for MaxWebservers when you interact with your Apache Airflow environment using Apache Airflow REST API, or the Apache Airflow CLI. For example, in scenarios where your workload requires network calls to the Apache Airflow REST API with a high transaction-per-second (TPS) rate, Amazon MWAA will increase the number of web servers up to the number set in MaxWebserers. As TPS rates decrease Amazon MWAA disposes of the additional web servers, and scales down to the number set in MinxWebserers.  Valid values: For environments larger than mw1.micro, accepts values from 2 to 5. Defaults to 2 for all environment sizes except mw1.micro, which defaults to 1.
        public let maxWebservers: Int?
        /// The maximum number of workers that you want to run in your environment. MWAA scales the number of Apache Airflow workers up to the number you specify in the MaxWorkers field. For example, 20. When there are no more tasks running, and no more in the queue, MWAA disposes of the extra workers leaving the one worker that is included with your environment, or the number you specify in MinWorkers.
        public let maxWorkers: Int?
        ///  The minimum number of web servers that you want to run in your environment. Amazon MWAA scales the number of Apache Airflow web servers up to the number you specify for MaxWebservers when you interact with your Apache Airflow environment using Apache Airflow REST API, or the Apache Airflow CLI. As the transaction-per-second rate, and the network load, decrease, Amazon MWAA disposes of the additional web servers, and scales down to the number set in MinxWebserers.  Valid values: For environments larger than mw1.micro, accepts values from 2 to 5. Defaults to 2 for all environment sizes except mw1.micro, which defaults to 1.
        public let minWebservers: Int?
        /// The minimum number of workers that you want to run in your environment. MWAA scales the number of Apache Airflow workers up to the number you specify in the MaxWorkers field. When there are no more tasks running, and no more in the queue, MWAA disposes of the extra workers leaving the worker count you specify in the MinWorkers field. For example, 2.
        public let minWorkers: Int?
        /// The name of your Amazon MWAA environment. For example, MyMWAAEnvironment.
        public let name: String
        /// The VPC networking components used to secure and enable network traffic between the Amazon Web Services resources for your environment. For more information, see About networking on Amazon MWAA.
        public let networkConfiguration: UpdateNetworkConfigurationInput?
        /// The version of the plugins.zip file on your Amazon S3 bucket. You must specify a version each time a plugins.zip file is updated. For more information, see How S3 Versioning works.
        public let pluginsS3ObjectVersion: String?
        /// The relative path to the plugins.zip file on your Amazon S3 bucket. For example, plugins.zip. If specified, then the plugins.zip version is required. For more information, see Installing custom plugins.
        public let pluginsS3Path: String?
        /// The version of the requirements.txt file on your Amazon S3 bucket. You must specify a version each time a requirements.txt file is updated. For more information, see How S3 Versioning works.
        public let requirementsS3ObjectVersion: String?
        /// The relative path to the requirements.txt file on your Amazon S3 bucket. For example, requirements.txt. If specified, then a file version is required. For more information, see Installing Python dependencies.
        public let requirementsS3Path: String?
        /// The number of Apache Airflow schedulers to run in your Amazon MWAA environment.
        public let schedulers: Int?
        /// The Amazon Resource Name (ARN) of the Amazon S3 bucket where your DAG code and supporting files are stored. For example, arn:aws:s3:::my-airflow-bucket-unique-name. For more information, see Create an Amazon S3 bucket for Amazon MWAA.
        public let sourceBucketArn: String?
        ///  The version of the startup shell script in your Amazon S3 bucket. You must specify the version ID that Amazon S3 assigns to the file every time you update the script.   Version IDs are Unicode, UTF-8 encoded, URL-ready, opaque strings that are no more than 1,024 bytes long. The following is an example:   3sL4kqtJlcpXroDTDmJ+rmSpXd3dIbrHY+MTRCxf3vjVBH40Nr8X8gdRQBpUMLUo   For more information, see Using a startup script.
        public let startupScriptS3ObjectVersion: String?
        /// The relative path to the startup shell script in your Amazon S3 bucket. For example, s3://mwaa-environment/startup.sh.  Amazon MWAA runs the script as your environment starts, and before running the Apache Airflow process. You can use this script to install dependencies, modify Apache Airflow configuration options, and set environment variables. For more information, see Using a startup script.
        public let startupScriptS3Path: String?
        /// The Apache Airflow Web server access mode. For more information, see Apache Airflow access modes.
        public let webserverAccessMode: WebserverAccessMode?
        /// The day and time of the week in Coordinated Universal Time (UTC) 24-hour standard time to start weekly maintenance updates of your environment in the following format: DAY:HH:MM. For example: TUE:03:30. You can specify a start time in 30 minute increments only.
        public let weeklyMaintenanceWindowStart: String?
        /// The worker replacement strategy to use when updating the environment. You can select one of the following strategies:    Forced - Stops and replaces Apache Airflow workers without waiting for tasks to  complete before an update.    Graceful - Allows Apache Airflow workers to complete running tasks for up to 12 hours during an update before  they're stopped and replaced.
        public let workerReplacementStrategy: WorkerReplacementStrategy?

        @inlinable
        public init(airflowConfigurationOptions: [String: String]? = nil, airflowVersion: String? = nil, dagS3Path: String? = nil, environmentClass: String? = nil, executionRoleArn: String? = nil, loggingConfiguration: LoggingConfigurationInput? = nil, maxWebservers: Int? = nil, maxWorkers: Int? = nil, minWebservers: Int? = nil, minWorkers: Int? = nil, name: String, networkConfiguration: UpdateNetworkConfigurationInput? = nil, pluginsS3ObjectVersion: String? = nil, pluginsS3Path: String? = nil, requirementsS3ObjectVersion: String? = nil, requirementsS3Path: String? = nil, schedulers: Int? = nil, sourceBucketArn: String? = nil, startupScriptS3ObjectVersion: String? = nil, startupScriptS3Path: String? = nil, webserverAccessMode: WebserverAccessMode? = nil, weeklyMaintenanceWindowStart: String? = nil, workerReplacementStrategy: WorkerReplacementStrategy? = nil) {
            self.airflowConfigurationOptions = airflowConfigurationOptions
            self.airflowVersion = airflowVersion
            self.dagS3Path = dagS3Path
            self.environmentClass = environmentClass
            self.executionRoleArn = executionRoleArn
            self.loggingConfiguration = loggingConfiguration
            self.maxWebservers = maxWebservers
            self.maxWorkers = maxWorkers
            self.minWebservers = minWebservers
            self.minWorkers = minWorkers
            self.name = name
            self.networkConfiguration = networkConfiguration
            self.pluginsS3ObjectVersion = pluginsS3ObjectVersion
            self.pluginsS3Path = pluginsS3Path
            self.requirementsS3ObjectVersion = requirementsS3ObjectVersion
            self.requirementsS3Path = requirementsS3Path
            self.schedulers = schedulers
            self.sourceBucketArn = sourceBucketArn
            self.startupScriptS3ObjectVersion = startupScriptS3ObjectVersion
            self.startupScriptS3Path = startupScriptS3Path
            self.webserverAccessMode = webserverAccessMode
            self.weeklyMaintenanceWindowStart = weeklyMaintenanceWindowStart
            self.workerReplacementStrategy = workerReplacementStrategy
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encodeIfPresent(self.airflowConfigurationOptions, forKey: .airflowConfigurationOptions)
            try container.encodeIfPresent(self.airflowVersion, forKey: .airflowVersion)
            try container.encodeIfPresent(self.dagS3Path, forKey: .dagS3Path)
            try container.encodeIfPresent(self.environmentClass, forKey: .environmentClass)
            try container.encodeIfPresent(self.executionRoleArn, forKey: .executionRoleArn)
            try container.encodeIfPresent(self.loggingConfiguration, forKey: .loggingConfiguration)
            try container.encodeIfPresent(self.maxWebservers, forKey: .maxWebservers)
            try container.encodeIfPresent(self.maxWorkers, forKey: .maxWorkers)
            try container.encodeIfPresent(self.minWebservers, forKey: .minWebservers)
            try container.encodeIfPresent(self.minWorkers, forKey: .minWorkers)
            request.encodePath(self.name, key: "Name")
            try container.encodeIfPresent(self.networkConfiguration, forKey: .networkConfiguration)
            try container.encodeIfPresent(self.pluginsS3ObjectVersion, forKey: .pluginsS3ObjectVersion)
            try container.encodeIfPresent(self.pluginsS3Path, forKey: .pluginsS3Path)
            try container.encodeIfPresent(self.requirementsS3ObjectVersion, forKey: .requirementsS3ObjectVersion)
            try container.encodeIfPresent(self.requirementsS3Path, forKey: .requirementsS3Path)
            try container.encodeIfPresent(self.schedulers, forKey: .schedulers)
            try container.encodeIfPresent(self.sourceBucketArn, forKey: .sourceBucketArn)
            try container.encodeIfPresent(self.startupScriptS3ObjectVersion, forKey: .startupScriptS3ObjectVersion)
            try container.encodeIfPresent(self.startupScriptS3Path, forKey: .startupScriptS3Path)
            try container.encodeIfPresent(self.webserverAccessMode, forKey: .webserverAccessMode)
            try container.encodeIfPresent(self.weeklyMaintenanceWindowStart, forKey: .weeklyMaintenanceWindowStart)
            try container.encodeIfPresent(self.workerReplacementStrategy, forKey: .workerReplacementStrategy)
        }

        public func validate(name: String) throws {
            try self.airflowConfigurationOptions?.forEach {
                try validate($0.key, name: "airflowConfigurationOptions.key", parent: name, max: 64)
                try validate($0.key, name: "airflowConfigurationOptions.key", parent: name, min: 1)
                try validate($0.key, name: "airflowConfigurationOptions.key", parent: name, pattern: "^[a-z]+([a-z0-9._]*[a-z0-9_]+)?$")
                try validate($0.value, name: "airflowConfigurationOptions[\"\($0.key)\"]", parent: name, max: 65536)
                try validate($0.value, name: "airflowConfigurationOptions[\"\($0.key)\"]", parent: name, min: 1)
                try validate($0.value, name: "airflowConfigurationOptions[\"\($0.key)\"]", parent: name, pattern: "^[ -~]+$")
            }
            try self.validate(self.airflowVersion, name: "airflowVersion", parent: name, max: 32)
            try self.validate(self.airflowVersion, name: "airflowVersion", parent: name, min: 1)
            try self.validate(self.airflowVersion, name: "airflowVersion", parent: name, pattern: "^[0-9a-z.]+$")
            try self.validate(self.dagS3Path, name: "dagS3Path", parent: name, max: 1024)
            try self.validate(self.dagS3Path, name: "dagS3Path", parent: name, min: 1)
            try self.validate(self.dagS3Path, name: "dagS3Path", parent: name, pattern: ".*")
            try self.validate(self.environmentClass, name: "environmentClass", parent: name, max: 1024)
            try self.validate(self.environmentClass, name: "environmentClass", parent: name, min: 1)
            try self.validate(self.executionRoleArn, name: "executionRoleArn", parent: name, max: 1224)
            try self.validate(self.executionRoleArn, name: "executionRoleArn", parent: name, min: 1)
            try self.validate(self.executionRoleArn, name: "executionRoleArn", parent: name, pattern: "^arn:aws(-[a-z]+)?:iam::\\d{12}:role/?[a-zA-Z_0-9+=,.@\\-_/]+$")
            try self.validate(self.maxWebservers, name: "maxWebservers", parent: name, min: 1)
            try self.validate(self.maxWorkers, name: "maxWorkers", parent: name, min: 1)
            try self.validate(self.minWebservers, name: "minWebservers", parent: name, min: 1)
            try self.validate(self.minWorkers, name: "minWorkers", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, max: 80)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[a-zA-Z][0-9a-zA-Z-_]*$")
            try self.networkConfiguration?.validate(name: "\(name).networkConfiguration")
            try self.validate(self.pluginsS3ObjectVersion, name: "pluginsS3ObjectVersion", parent: name, max: 1024)
            try self.validate(self.pluginsS3ObjectVersion, name: "pluginsS3ObjectVersion", parent: name, min: 1)
            try self.validate(self.pluginsS3Path, name: "pluginsS3Path", parent: name, max: 1024)
            try self.validate(self.pluginsS3Path, name: "pluginsS3Path", parent: name, min: 1)
            try self.validate(self.pluginsS3Path, name: "pluginsS3Path", parent: name, pattern: ".*")
            try self.validate(self.requirementsS3ObjectVersion, name: "requirementsS3ObjectVersion", parent: name, max: 1024)
            try self.validate(self.requirementsS3ObjectVersion, name: "requirementsS3ObjectVersion", parent: name, min: 1)
            try self.validate(self.requirementsS3Path, name: "requirementsS3Path", parent: name, max: 1024)
            try self.validate(self.requirementsS3Path, name: "requirementsS3Path", parent: name, min: 1)
            try self.validate(self.requirementsS3Path, name: "requirementsS3Path", parent: name, pattern: ".*")
            try self.validate(self.schedulers, name: "schedulers", parent: name, max: 5)
            try self.validate(self.sourceBucketArn, name: "sourceBucketArn", parent: name, max: 1224)
            try self.validate(self.sourceBucketArn, name: "sourceBucketArn", parent: name, min: 1)
            try self.validate(self.sourceBucketArn, name: "sourceBucketArn", parent: name, pattern: "^arn:aws(-[a-z]+)?:s3:::[a-z0-9.\\-]+$")
            try self.validate(self.startupScriptS3ObjectVersion, name: "startupScriptS3ObjectVersion", parent: name, max: 1024)
            try self.validate(self.startupScriptS3ObjectVersion, name: "startupScriptS3ObjectVersion", parent: name, min: 1)
            try self.validate(self.startupScriptS3Path, name: "startupScriptS3Path", parent: name, max: 1024)
            try self.validate(self.startupScriptS3Path, name: "startupScriptS3Path", parent: name, min: 1)
            try self.validate(self.startupScriptS3Path, name: "startupScriptS3Path", parent: name, pattern: ".*")
            try self.validate(self.weeklyMaintenanceWindowStart, name: "weeklyMaintenanceWindowStart", parent: name, max: 9)
            try self.validate(self.weeklyMaintenanceWindowStart, name: "weeklyMaintenanceWindowStart", parent: name, min: 1)
            try self.validate(self.weeklyMaintenanceWindowStart, name: "weeklyMaintenanceWindowStart", parent: name, pattern: "(MON|TUE|WED|THU|FRI|SAT|SUN):([01]\\d|2[0-3]):(00|30)")
        }

        private enum CodingKeys: String, CodingKey {
            case airflowConfigurationOptions = "AirflowConfigurationOptions"
            case airflowVersion = "AirflowVersion"
            case dagS3Path = "DagS3Path"
            case environmentClass = "EnvironmentClass"
            case executionRoleArn = "ExecutionRoleArn"
            case loggingConfiguration = "LoggingConfiguration"
            case maxWebservers = "MaxWebservers"
            case maxWorkers = "MaxWorkers"
            case minWebservers = "MinWebservers"
            case minWorkers = "MinWorkers"
            case networkConfiguration = "NetworkConfiguration"
            case pluginsS3ObjectVersion = "PluginsS3ObjectVersion"
            case pluginsS3Path = "PluginsS3Path"
            case requirementsS3ObjectVersion = "RequirementsS3ObjectVersion"
            case requirementsS3Path = "RequirementsS3Path"
            case schedulers = "Schedulers"
            case sourceBucketArn = "SourceBucketArn"
            case startupScriptS3ObjectVersion = "StartupScriptS3ObjectVersion"
            case startupScriptS3Path = "StartupScriptS3Path"
            case webserverAccessMode = "WebserverAccessMode"
            case weeklyMaintenanceWindowStart = "WeeklyMaintenanceWindowStart"
            case workerReplacementStrategy = "WorkerReplacementStrategy"
        }
    }

    public struct UpdateEnvironmentOutput: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the Amazon MWAA environment. For example, arn:aws:airflow:us-east-1:123456789012:environment/MyMWAAEnvironment.
        public let arn: String?

        @inlinable
        public init(arn: String? = nil) {
            self.arn = arn
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "Arn"
        }
    }

    public struct UpdateError: AWSDecodableShape {
        /// The error code that corresponds to the error with the last update.
        public let errorCode: String?
        /// The error message that corresponds to the error code.
        public let errorMessage: String?

        @inlinable
        public init(errorCode: String? = nil, errorMessage: String? = nil) {
            self.errorCode = errorCode
            self.errorMessage = errorMessage
        }

        private enum CodingKeys: String, CodingKey {
            case errorCode = "ErrorCode"
            case errorMessage = "ErrorMessage"
        }
    }

    public struct UpdateNetworkConfigurationInput: AWSEncodableShape {
        /// A list of security group IDs. A security group must be attached to the same VPC as the subnets. For more information, see Security in your VPC on Amazon MWAA.
        public let securityGroupIds: [String]

        @inlinable
        public init(securityGroupIds: [String]) {
            self.securityGroupIds = securityGroupIds
        }

        public func validate(name: String) throws {
            try self.securityGroupIds.forEach {
                try validate($0, name: "securityGroupIds[]", parent: name, max: 1024)
                try validate($0, name: "securityGroupIds[]", parent: name, min: 1)
                try validate($0, name: "securityGroupIds[]", parent: name, pattern: "^sg-[a-zA-Z0-9\\-._]+$")
            }
            try self.validate(self.securityGroupIds, name: "securityGroupIds", parent: name, max: 5)
            try self.validate(self.securityGroupIds, name: "securityGroupIds", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case securityGroupIds = "SecurityGroupIds"
        }
    }
}

// MARK: - Errors

/// Error enum for MWAA
public struct MWAAErrorType: AWSErrorType {
    enum Code: String {
        case accessDeniedException = "AccessDeniedException"
        case internalServerException = "InternalServerException"
        case resourceNotFoundException = "ResourceNotFoundException"
        case restApiClientException = "RestApiClientException"
        case restApiServerException = "RestApiServerException"
        case validationException = "ValidationException"
    }

    private let error: Code
    public let context: AWSErrorContext?

    /// initialize MWAA
    public init?(errorCode: String, context: AWSErrorContext) {
        guard let error = Code(rawValue: errorCode) else { return nil }
        self.error = error
        self.context = context
    }

    internal init(_ error: Code) {
        self.error = error
        self.context = nil
    }

    /// return error code string
    public var errorCode: String { self.error.rawValue }

    /// Access to the Apache Airflow Web UI or CLI has been denied due to insufficient permissions. To learn more, see Accessing an Amazon MWAA environment.
    public static var accessDeniedException: Self { .init(.accessDeniedException) }
    /// InternalServerException: An internal error has occurred.
    public static var internalServerException: Self { .init(.internalServerException) }
    /// ResourceNotFoundException: The resource is not available.
    public static var resourceNotFoundException: Self { .init(.resourceNotFoundException) }
    /// An exception indicating that a client-side error occurred during the Apache Airflow REST API call.
    public static var restApiClientException: Self { .init(.restApiClientException) }
    /// An exception indicating that a server-side error occurred during the Apache Airflow REST API call.
    public static var restApiServerException: Self { .init(.restApiServerException) }
    /// ValidationException: The provided input is not valid.
    public static var validationException: Self { .init(.validationException) }
}

extension MWAAErrorType: AWSServiceErrorType {
    public static let errorCodeMap: [String: AWSErrorShape.Type] = [
        "RestApiClientException": MWAA.RestApiClientException.self,
        "RestApiServerException": MWAA.RestApiServerException.self
    ]
}

extension MWAAErrorType: Equatable {
    public static func == (lhs: MWAAErrorType, rhs: MWAAErrorType) -> Bool {
        lhs.error == rhs.error
    }
}

extension MWAAErrorType: CustomStringConvertible {
    public var description: String {
        return "\(self.error.rawValue): \(self.message ?? "")"
    }
}
